import mockjs from "mockjs"
import { getData } from "../utiles";
mockjs.mock(/\/login/, /post/, function (option) {
    let a = getData(option.body)
    if (a.rel == "123456" && a.code == "123") {
        return {
            code: 0,
            msg: "登录成功",
            token: "qdnjwoidjqwoidqwjoidqwjoi",
            useInfo: {
                rel: a.rel
            }
        }
    } else {
        return {
            code: 1,
            msg: "未知错误",
        }
    }

})